<template>
	<view class="content">
		<lxc_nav text='忘记密码'></lxc_nav>
		<view id="box">
			<u-field v-model="mobile" :label="$t('all.d')" :placeholder="this.$t('all.d')">
			</u-field>
			<u-field v-model="code" :label="$t('all.l')" :placeholder="$t('all.m')">

				<view id="but" slot="right" @tap="xcode">{{text}}</view>
			</u-field>
			<u-field v-model="pass" :label="$t('all.n')" :placeholder="$t('all.o')">
			</u-field>
			<u-field v-model="pass1" :label="$t('all.p')" :placeholder="$t('all.q')">
			</u-field>
			<view id="bottom">
				{{$t('all.r')}}
			</view>

		</view>

	</view>
</template>

<script>
	import lxc_nav from '../../components/nav.vue'
	export default {
		components: {
			lxc_nav
		},
		data() {
			return {
				mobile: '',
				code: '',
				pass: '',
				pass1: '',
				text: this.$t('all.l')
			}
		},
		onLoad() {

		},
		methods: {
			xcode() {
				let _this = this
				if (_this.text == this.$t('all.l')) {
					var x;
					clearInterval(x);
					console.log(123456);
					let time = 60
					x = setInterval(() => {
						time--
						_this.text = `${time}`
						if (time < 5) {
							clearInterval(x);
							_this.text = this.$t('all.l')
						}
					}, 1000)
				}
			},

		}
	}
</script>

<style lang="scss" scoped>
	#box {
		position: relative;
		top: 100rpx;
		width: 92vw;
		margin-left: 4vw;
		// color: $u-content-color;
	}

	#but {
		width: 160rpx;
		height: 60rpx;
		background: #1989FA;
		border-radius: 10rpx;
		line-height: 60rpx;
		text-align: center;
		color: #FFFFFF;
	}

	#bottom {
		margin-top: 76rpx;
		width: 92vw;
		background-color: $lxc_title;
		height: 80rpx;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 80rpx;

		border-radius: 10rpx;
	}
</style>
